package com.webank.wedatasphere.qualitis.question.entity;

import com.fasterxml.jackson.annotation.JsonIdentityInfo;
import com.fasterxml.jackson.annotation.ObjectIdGenerators;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.util.Date;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Entity
@Table(name = "qualitis_question_order")
@JsonIdentityInfo(generator = ObjectIdGenerators.IntSequenceGenerator.class)
public class Order {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    private String name;

    @Column(name = "quality_standard")
    private Long qualityStandard;

    @Column(name = "quality_standard_name")
    private String qualityStandardName;

    @Column(name = "order_time")
    private Date orderTime;

    @Column(name = "complete_time")
    private Date completeTime;

    @Column(name = "return_time")
    private Date returnTime;

    private Integer status;

    private String version;

    private Long handler;

    @Column(name = "handler_name")
    private String handlerName;

    @Column(name = "update_time")
    private Date updateTime;

    @Column(name = "create_time")
    private Date createTime;

    private String cause;
    private String plan;
    private String suggestion;

    @Column(name = "task_id")
    private Long taskId;
}
